package com.clouddot.baipai.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.clouddot.baipai.R;
import com.clouddot.baipai.http.entity.response.getClassHonorResponse;

import java.util.List;

/**
 * Created by wxy on 2018/8/26.
 */

public class H_ClassHonorAdapter extends BaseQuickAdapter<getClassHonorResponse.honorInfo, BaseViewHolder> {

    private List<getClassHonorResponse.honorInfo> mData;

    public H_ClassHonorAdapter(List<getClassHonorResponse.honorInfo> mDataList) {
        super(R.layout.h_adapter_classhonor_item, mDataList);
        mData = mDataList;
    }


    @Override
    protected void convert(BaseViewHolder helper, getClassHonorResponse.honorInfo item) {

        helper.setText(R.id.tv_date, item.EventDate);
        helper.setText(R.id.tv_desc, item.HonorItemText + "\n" + item.HonorLevelText);

        if (mData.get(0).Id == item.Id) {
            helper.setVisible(R.id.tv_dot_top, true);
        }

    }

}
